arr=[1,2,5,6,8]
ans=0

for i in range(0,len(arr)-1):
    for j in range(i+1,len(arr)):
        suM=arr[i]+arr[j]
        print(arr[i],arr[j])
        if suM==9:
            ans+=1
        else:
            suM=0
print(ans)
    
